/*UL4D2_client_validation.sp*/

//UL4D2 MaxPlayers
#define L4D2_MAXPLAYERS 32

//UL4D2 Teams
#define TEAM_UNKNOWN 0
#define TEAM_SPECTATOR 1
#define TEAM_SURVIVOR 2
#define TEAM_INFECTED 3

//UL4D2 ZombieClasses
#define ZC_UNKNOWN    0
#define ZC_SMOKER 1
#define ZC_BOOMER 2
#define ZC_HUNTER 3
#define ZC_SPITTER 4
#define ZC_JOCKEY 5
#define ZC_CHARGER 6
#define ZC_WITCH 7
#define ZC_TANK 8
#define ZC_NOT_INFECTED 9     //survivor


public IsValidClient(client){

if (client == 0)
return false;

if (!IsClientConnected(client))
return false;

if (!IsClientInGame(client))
return false;

if (IsFakeClient(client))
return false;

return true;

}

public bool:IsPlayerTank(client)
{
	new String:class[150];
	GetClientModel(client, class, sizeof(class));
	return (StrContains(class, "hulk", false) != -1);
}

bool:IsValidAliveSurv(client)
{
	if (!IsClientInGame(client))
	{
		return false;
	}
	if (!IsPlayerAlive(client))
	{
		return false;
	}
	if (GetClientTeam(client) != 2)
	{
		return false;
	}
	return true;
}